﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Web7.Domain;

namespace Web7.Core.Security
{
    [Serializable]
    public class Role : RoleBasic
    {
        public Role()
        {
            Permissions = Enumerable.Empty<PermissionRecord>();
        }

        public virtual IEnumerable<PermissionRecord> Permissions { get; set; }
    }

    [Serializable]
    public class RoleBasic : Entity
    {
        /// <summary>
        /// 
        /// </summary>
        [Required]
        public virtual string RoleName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public virtual bool IsSystem { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public virtual int RoleStatus { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public virtual string Description { get; set; }
        
        //public virtual Guid RoleID { get; set; }
    }
}
